import request from '@/utils/request'

export function getSinglePre(type) {
  return request({
    url: '/monitor/pre_model/pre/single',
    method: 'post',
    data:type
  })
}
export function getPreDataFor3Month() {
  return request({
    url: '/monitor/pre_model/pre/3month',
    method: 'get'
  })
}

export function getPreDataForMonth() {
  return request({
    url: '/monitor/pre_model/pre/month',
    method: 'get'
  })
}

export function getPreData() {
  return request({
    url: '/monitor/pre_model/pre/24',
    method: 'get'
  })
}


// 查询模型预测列表
export function listPre_model(query) {
  return request({
    url: '/monitor/pre_model/list',
    method: 'get',
    params: query
  })
}

// 查询模型预测详细
export function getPre_model(id) {
  return request({
    url: '/monitor/pre_model/' + id,
    method: 'get'
  })
}

// 新增模型预测
export function addPre_model(data) {
  return request({
    url: '/monitor/pre_model',
    method: 'post',
    data: data
  })
}

// 修改模型预测
export function updatePre_model(data) {
  return request({
    url: '/monitor/pre_model',
    method: 'put',
    data: data
  })
}

// 删除模型预测
export function delPre_model(id) {
  return request({
    url: '/monitor/pre_model/' + id,
    method: 'delete'
  })
}
